SET(AUDIO_CODING_SRC
  "main/acm2/acm_codec_database.cc"
  "main/acm2/acm_codec_database.h"
  "main/acm2/acm_common_defs.h"
  "main/acm2/acm_receiver.cc"
  "main/acm2/acm_receiver.h"
  "main/acm2/acm_resampler.cc"
  "main/acm2/acm_resampler.h"
  "main/acm2/audio_coding_module.cc"
  "main/acm2/audio_coding_module_impl.cc"
  "main/acm2/audio_coding_module_impl.h"
  "main/acm2/call_statistics.cc"
  "main/acm2/call_statistics.h"
  "main/acm2/codec_manager.cc"
  "main/acm2/codec_manager.h"
  "main/acm2/codec_owner.cc"
  "main/acm2/codec_owner.h"
  "main/acm2/initial_delay_manager.cc"
  "main/acm2/initial_delay_manager.h"
  "main/acm2/nack.cc"
  "main/acm2/nack.h"
  "main/interface/audio_coding_module.h"
  "main/interface/audio_coding_module_typedefs.h"
  "codecs/audio_decoder.cc"
  "codecs/audio_decoder.h"
  "codecs/audio_encoder.cc"
  "codecs/audio_encoder.h"
  "codecs/cng/audio_encoder_cng.cc"
  "codecs/cng/cng_helpfuns.c"
  "codecs/cng/cng_helpfuns.h"
  "codecs/cng/include/audio_encoder_cng.h"
  "codecs/cng/include/webrtc_cng.h"
  "codecs/cng/webrtc_cng.c"
  "codecs/red/audio_encoder_copy_red.cc"
  "codecs/red/audio_encoder_copy_red.h"
  "codecs/g711/audio_encoder_pcm.cc"
  "codecs/g711/g711.c"
  "codecs/g711/g711.h"
  "codecs/g711/g711_interface.c"
  "codecs/g711/include/audio_encoder_pcm.h"
  "codecs/g711/include/g711_interface.h"
  "codecs/g722/audio_decoder_g722.cc"
  "codecs/g722/audio_encoder_g722.cc"
  "codecs/g722/g722_decode.c"
  "codecs/g722/g722_enc_dec.h"
  "codecs/g722/g722_encode.c"
  "codecs/g722/g722_interface.c"
  "codecs/g722/include/audio_decoder_g722.h"
  "codecs/g722/include/audio_encoder_g722.h"
  "codecs/g722/include/g722_interface.h"
  "codecs/ilbc/abs_quant.c"
  "codecs/ilbc/abs_quant.h"
  "codecs/ilbc/abs_quant_loop.c"
  "codecs/ilbc/abs_quant_loop.h"
  "codecs/ilbc/audio_decoder_ilbc.cc"
  "codecs/ilbc/audio_encoder_ilbc.cc"
  "codecs/ilbc/augmented_cb_corr.c"
  "codecs/ilbc/augmented_cb_corr.h"
  "codecs/ilbc/bw_expand.c"
  "codecs/ilbc/bw_expand.h"
  "codecs/ilbc/cb_construct.c"
  "codecs/ilbc/cb_construct.h"
  "codecs/ilbc/cb_mem_energy.c"
  "codecs/ilbc/cb_mem_energy.h"
  "codecs/ilbc/cb_mem_energy_augmentation.c"
  "codecs/ilbc/cb_mem_energy_augmentation.h"
  "codecs/ilbc/cb_mem_energy_calc.c"
  "codecs/ilbc/cb_mem_energy_calc.h"
  "codecs/ilbc/cb_search.c"
  "codecs/ilbc/cb_search.h"
  "codecs/ilbc/cb_search_core.c"
  "codecs/ilbc/cb_search_core.h"
  "codecs/ilbc/cb_update_best_index.c"
  "codecs/ilbc/cb_update_best_index.h"
  "codecs/ilbc/chebyshev.c"
  "codecs/ilbc/chebyshev.h"
  "codecs/ilbc/comp_corr.c"
  "codecs/ilbc/comp_corr.h"
  "codecs/ilbc/constants.c"
  "codecs/ilbc/constants.h"
  "codecs/ilbc/create_augmented_vec.c"
  "codecs/ilbc/create_augmented_vec.h"
  "codecs/ilbc/decode.c"
  "codecs/ilbc/decode.h"
  "codecs/ilbc/decode_residual.c"
  "codecs/ilbc/decode_residual.h"
  "codecs/ilbc/decoder_interpolate_lsf.c"
  "codecs/ilbc/decoder_interpolate_lsf.h"
  "codecs/ilbc/defines.h"
  "codecs/ilbc/do_plc.c"
  "codecs/ilbc/do_plc.h"
  "codecs/ilbc/encode.c"
  "codecs/ilbc/encode.h"
  "codecs/ilbc/energy_inverse.c"
  "codecs/ilbc/energy_inverse.h"
  "codecs/ilbc/enh_upsample.c"
  "codecs/ilbc/enh_upsample.h"
  "codecs/ilbc/enhancer.c"
  "codecs/ilbc/enhancer.h"
  "codecs/ilbc/enhancer_interface.c"
  "codecs/ilbc/enhancer_interface.h"
  "codecs/ilbc/filtered_cb_vecs.c"
  "codecs/ilbc/filtered_cb_vecs.h"
  "codecs/ilbc/frame_classify.c"
  "codecs/ilbc/frame_classify.h"
  "codecs/ilbc/gain_dequant.c"
  "codecs/ilbc/gain_dequant.h"
  "codecs/ilbc/gain_quant.c"
  "codecs/ilbc/gain_quant.h"
  "codecs/ilbc/get_cd_vec.c"
  "codecs/ilbc/get_cd_vec.h"
  "codecs/ilbc/get_lsp_poly.c"
  "codecs/ilbc/get_lsp_poly.h"
  "codecs/ilbc/get_sync_seq.c"
  "codecs/ilbc/get_sync_seq.h"
  "codecs/ilbc/hp_input.c"
  "codecs/ilbc/hp_input.h"
  "codecs/ilbc/hp_output.c"
  "codecs/ilbc/hp_output.h"
  "codecs/ilbc/ilbc.c"
  "codecs/ilbc/interface/audio_decoder_ilbc.h"
  "codecs/ilbc/interface/audio_encoder_ilbc.h"
  "codecs/ilbc/index_conv_dec.c"
  "codecs/ilbc/index_conv_dec.h"
  "codecs/ilbc/index_conv_enc.c"
  "codecs/ilbc/index_conv_enc.h"
  "codecs/ilbc/init_decode.c"
  "codecs/ilbc/init_decode.h"
  "codecs/ilbc/init_encode.c"
  "codecs/ilbc/init_encode.h"
  "codecs/ilbc/interface/ilbc.h"
  "codecs/ilbc/interpolate.c"
  "codecs/ilbc/interpolate.h"
  "codecs/ilbc/interpolate_samples.c"
  "codecs/ilbc/interpolate_samples.h"
  "codecs/ilbc/lpc_encode.c"
  "codecs/ilbc/lpc_encode.h"
  "codecs/ilbc/lsf_check.c"
  "codecs/ilbc/lsf_check.h"
  "codecs/ilbc/lsf_interpolate_to_poly_dec.c"
  "codecs/ilbc/lsf_interpolate_to_poly_dec.h"
  "codecs/ilbc/lsf_interpolate_to_poly_enc.c"
  "codecs/ilbc/lsf_interpolate_to_poly_enc.h"
  "codecs/ilbc/lsf_to_lsp.c"
  "codecs/ilbc/lsf_to_lsp.h"
  "codecs/ilbc/lsf_to_poly.c"
  "codecs/ilbc/lsf_to_poly.h"
  "codecs/ilbc/lsp_to_lsf.c"
  "codecs/ilbc/lsp_to_lsf.h"
  "codecs/ilbc/my_corr.c"
  "codecs/ilbc/my_corr.h"
  "codecs/ilbc/nearest_neighbor.c"
  "codecs/ilbc/nearest_neighbor.h"
  "codecs/ilbc/pack_bits.c"
  "codecs/ilbc/pack_bits.h"
  "codecs/ilbc/poly_to_lsf.c"
  "codecs/ilbc/poly_to_lsf.h"
  "codecs/ilbc/poly_to_lsp.c"
  "codecs/ilbc/poly_to_lsp.h"
  "codecs/ilbc/refiner.c"
  "codecs/ilbc/refiner.h"
  "codecs/ilbc/simple_interpolate_lsf.c"
  "codecs/ilbc/simple_interpolate_lsf.h"
  "codecs/ilbc/simple_lpc_analysis.c"
  "codecs/ilbc/simple_lpc_analysis.h"
  "codecs/ilbc/simple_lsf_dequant.c"
  "codecs/ilbc/simple_lsf_dequant.h"
  "codecs/ilbc/simple_lsf_quant.c"
  "codecs/ilbc/simple_lsf_quant.h"
  "codecs/ilbc/smooth.c"
  "codecs/ilbc/smooth.h"
  "codecs/ilbc/smooth_out_data.c"
  "codecs/ilbc/smooth_out_data.h"
  "codecs/ilbc/sort_sq.c"
  "codecs/ilbc/sort_sq.h"
  "codecs/ilbc/split_vq.c"
  "codecs/ilbc/split_vq.h"
  "codecs/ilbc/state_construct.c"
  "codecs/ilbc/state_construct.h"
  "codecs/ilbc/state_search.c"
  "codecs/ilbc/state_search.h"
  "codecs/ilbc/swap_bytes.c"
  "codecs/ilbc/swap_bytes.h"
  "codecs/ilbc/unpack_bits.c"
  "codecs/ilbc/unpack_bits.h"
  "codecs/ilbc/vq3.c"
  "codecs/ilbc/vq3.h"
  "codecs/ilbc/vq4.c"
  "codecs/ilbc/vq4.h"
  "codecs/ilbc/window32_w32.c"
  "codecs/ilbc/window32_w32.h"
  "codecs/ilbc/xcorr_coef.c"
  "codecs/ilbc/xcorr_coef.h"
  "codecs/isac/audio_encoder_isac_t.h"
  "codecs/isac/audio_encoder_isac_t_impl.h"
  "codecs/isac/locked_bandwidth_info.cc"
  "codecs/isac/locked_bandwidth_info.h"
  "codecs/isac/main/interface/audio_encoder_isac.h"
  "codecs/isac/main/interface/isac.h"
  "codecs/isac/main/source/arith_routines.c"
  "codecs/isac/main/source/arith_routines.h"
  "codecs/isac/main/source/arith_routines_hist.c"
  "codecs/isac/main/source/arith_routines_logist.c"
  "codecs/isac/main/source/audio_encoder_isac.cc"
  "codecs/isac/main/source/bandwidth_estimator.c"
  "codecs/isac/main/source/bandwidth_estimator.h"
  "codecs/isac/main/source/codec.h"
  "codecs/isac/main/source/crc.c"
  "codecs/isac/main/source/crc.h"
  "codecs/isac/main/source/decode.c"
  "codecs/isac/main/source/decode_bwe.c"
  "codecs/isac/main/source/encode.c"
  "codecs/isac/main/source/encode_lpc_swb.c"
  "codecs/isac/main/source/encode_lpc_swb.h"
  "codecs/isac/main/source/entropy_coding.c"
  "codecs/isac/main/source/entropy_coding.h"
  "codecs/isac/main/source/fft.c"
  "codecs/isac/main/source/fft.h"
  "codecs/isac/main/source/filter_functions.c"
  "codecs/isac/main/source/filterbank_tables.c"
  "codecs/isac/main/source/filterbank_tables.h"
  "codecs/isac/main/source/filterbanks.c"
  "codecs/isac/main/source/intialize.c"
  "codecs/isac/main/source/isac.c"
  "codecs/isac/main/source/lattice.c"
  "codecs/isac/main/source/lpc_analysis.c"
  "codecs/isac/main/source/lpc_analysis.h"
  "codecs/isac/main/source/lpc_gain_swb_tables.c"
  "codecs/isac/main/source/lpc_gain_swb_tables.h"
  "codecs/isac/main/source/lpc_shape_swb12_tables.c"
  "codecs/isac/main/source/lpc_shape_swb12_tables.h"
  "codecs/isac/main/source/lpc_shape_swb16_tables.c"
  "codecs/isac/main/source/lpc_shape_swb16_tables.h"
  "codecs/isac/main/source/lpc_tables.c"
  "codecs/isac/main/source/lpc_tables.h"
  "codecs/isac/main/source/os_specific_inline.h"
  "codecs/isac/main/source/pitch_estimator.c"
  "codecs/isac/main/source/pitch_estimator.h"
  "codecs/isac/main/source/pitch_filter.c"
  "codecs/isac/main/source/pitch_gain_tables.c"
  "codecs/isac/main/source/pitch_gain_tables.h"
  "codecs/isac/main/source/pitch_lag_tables.c"
  "codecs/isac/main/source/pitch_lag_tables.h"
  "codecs/isac/main/source/settings.h"
  "codecs/isac/main/source/spectrum_ar_model_tables.c"
  "codecs/isac/main/source/spectrum_ar_model_tables.h"
  "codecs/isac/main/source/structs.h"
  "codecs/isac/main/source/transform.c"
  "codecs/isac/fix/interface/audio_encoder_isacfix.h"
  "codecs/isac/fix/interface/isacfix.h"
  "codecs/isac/fix/source/arith_routines.c"
  "codecs/isac/fix/source/arith_routines_hist.c"
  "codecs/isac/fix/source/arith_routines_logist.c"
  "codecs/isac/fix/source/arith_routins.h"
  "codecs/isac/fix/source/audio_encoder_isacfix.cc"
  "codecs/isac/fix/source/bandwidth_estimator.c"
  "codecs/isac/fix/source/bandwidth_estimator.h"
  "codecs/isac/fix/source/codec.h"
  "codecs/isac/fix/source/decode.c"
  "codecs/isac/fix/source/decode_bwe.c"
  "codecs/isac/fix/source/decode_plc.c"
  "codecs/isac/fix/source/encode.c"
  "codecs/isac/fix/source/entropy_coding.c"
  "codecs/isac/fix/source/entropy_coding.h"
  "codecs/isac/fix/source/fft.c"
  "codecs/isac/fix/source/fft.h"
  "codecs/isac/fix/source/filterbank_tables.c"
  "codecs/isac/fix/source/filterbank_tables.h"
  "codecs/isac/fix/source/filterbanks.c"
  "codecs/isac/fix/source/filters.c"
  "codecs/isac/fix/source/initialize.c"
  "codecs/isac/fix/source/isacfix.c"
  "codecs/isac/fix/source/lattice.c"
  "codecs/isac/fix/source/lattice_c.c"
  "codecs/isac/fix/source/lpc_masking_model.c"
  "codecs/isac/fix/source/lpc_masking_model.h"
  "codecs/isac/fix/source/lpc_tables.c"
  "codecs/isac/fix/source/lpc_tables.h"
  "codecs/isac/fix/source/pitch_estimator.c"
  "codecs/isac/fix/source/pitch_estimator.h"
  "codecs/isac/fix/source/pitch_estimator_c.c"
  "codecs/isac/fix/source/pitch_filter.c"
  "codecs/isac/fix/source/pitch_filter_c.c"
  "codecs/isac/fix/source/pitch_gain_tables.c"
  "codecs/isac/fix/source/pitch_gain_tables.h"
  "codecs/isac/fix/source/pitch_lag_tables.c"
  "codecs/isac/fix/source/pitch_lag_tables.h"
  "codecs/isac/fix/source/settings.h"
  "codecs/isac/fix/source/spectrum_ar_model_tables.c"
  "codecs/isac/fix/source/spectrum_ar_model_tables.h"
  "codecs/isac/fix/source/structs.h"
  "codecs/isac/fix/source/transform.c"
  "codecs/isac/fix/source/transform_tables.c"
  "codecs/pcm16b/audio_decoder_pcm16b.cc"
  "codecs/pcm16b/audio_encoder_pcm16b.cc"
  "codecs/pcm16b/include/audio_decoder_pcm16b.h"
  "codecs/pcm16b/include/audio_encoder_pcm16b.h"
  "codecs/pcm16b/include/pcm16b.h"
  "codecs/pcm16b/pcm16b.c"
  "codecs/opus/audio_decoder_opus.cc"
  "codecs/opus/audio_encoder_opus.cc"
  "codecs/opus/interface/audio_decoder_opus.h"
  "codecs/opus/interface/audio_encoder_opus.h"
  "codecs/opus/interface/opus_interface.h"
  "codecs/opus/opus_inst.h"
  "codecs/opus/opus_interface.c"
  "neteq/accelerate.cc"
  "neteq/accelerate.h"
  # "neteq/audio_classifier.cc"
  # "neteq/audio_classifier.h"
  "neteq/audio_decoder_impl.cc"
  "neteq/audio_decoder_impl.h"
  "neteq/audio_multi_vector.cc"
  "neteq/audio_multi_vector.h"
  "neteq/audio_vector.cc"
  "neteq/audio_vector.h"
  "neteq/background_noise.cc"
  "neteq/background_noise.h"
  "neteq/buffer_level_filter.cc"
  "neteq/buffer_level_filter.h"
  "neteq/comfort_noise.cc"
  "neteq/comfort_noise.h"
  "neteq/decision_logic.cc"
  "neteq/decision_logic.h"
  "neteq/decision_logic_fax.cc"
  "neteq/decision_logic_fax.h"
  "neteq/decision_logic_normal.cc"
  "neteq/decision_logic_normal.h"
  "neteq/decoder_database.cc"
  "neteq/decoder_database.h"
  "neteq/defines.h"
  "neteq/delay_manager.cc"
  "neteq/delay_manager.h"
  "neteq/delay_peak_detector.cc"
  "neteq/delay_peak_detector.h"
  "neteq/dsp_helper.cc"
  "neteq/dsp_helper.h"
  "neteq/dtmf_buffer.cc"
  "neteq/dtmf_buffer.h"
  "neteq/dtmf_tone_generator.cc"
  "neteq/dtmf_tone_generator.h"
  "neteq/expand.cc"
  "neteq/expand.h"
  "neteq/interface/neteq.h"
  "neteq/merge.cc"
  "neteq/merge.h"
  "neteq/neteq.cc"
  "neteq/neteq_impl.cc"
  "neteq/neteq_impl.h"
  "neteq/normal.cc"
  "neteq/normal.h"
  "neteq/packet_buffer.cc"
  "neteq/packet_buffer.h"
  "neteq/payload_splitter.cc"
  "neteq/payload_splitter.h"
  "neteq/post_decode_vad.cc"
  "neteq/post_decode_vad.h"
  "neteq/preemptive_expand.cc"
  "neteq/preemptive_expand.h"
  "neteq/random_vector.cc"
  "neteq/random_vector.h"
  "neteq/rtcp.cc"
  "neteq/rtcp.h"
  "neteq/statistics_calculator.cc"
  "neteq/statistics_calculator.h"
  "neteq/sync_buffer.cc"
  "neteq/sync_buffer.h"
  "neteq/time_stretch.cc"
  "neteq/time_stretch.h"
  "neteq/timestamp_scaler.cc"
  "neteq/timestamp_scaler.h"
  )
include_directories(${PROJECT_SOURCE_DIR}/audio_coding/codecs/cng/include)
include_directories(${PROJECT_SOURCE_DIR}/audio_coding/codecs/red)
include_directories(${PROJECT_SOURCE_DIR}/audio_coding/codecs/g711/include)
include_directories(${PROJECT_SOURCE_DIR}/audio_coding/codecs/g722/include)
include_directories(${PROJECT_SOURCE_DIR}/audio_coding/codecs/ilbc/interface)
include_directories(${PROJECT_SOURCE_DIR}/audio_coding/codecs/isac/main/interface)
include_directories(${PROJECT_SOURCE_DIR}/audio_coding/libcelt)
include_directories(${PROJECT_SOURCE_DIR}/audio_coding/codecs/isac/fix/interface)
include_directories(${PROJECT_SOURCE_DIR}/audio_coding/codecs/pcm16b/include)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/common_audio/signal_processing/include)

if(IOS)
  INCLUDE_DIRECTORIES(${LIB_PATH_PREFIX}/libopus/include)
message(libopus path:  ${LIB_PATH_PREFIX}/libopus/include)
  LINK_DIRECTORIES(${LIBRARY_PATH_PREFIX}/libopus)
  add_library(AudioCoding ${AUDIO_CODING_SRC})
  target_link_libraries(AudioCoding CommonAudio opus)
else()
  find_path(opus_include_dir opus/opus.h)
  message(opus include:${opus_include_dir})
  include_directories(${opus_include_dir})

  # include_directories(/usr/local/Cellar/opus/1.1/include/opus)
  find_library(libopus opus)
  # find_library(libm m)
  message(${libopus})
  # message(libm:${libm})
  add_definitions(-DWEBRTC_LINUX)

  add_library(AudioCoding ${AUDIO_CODING_SRC})
  target_link_libraries(AudioCoding CommonAudio )

endif()

# find_path(opus_include_dir opus/opus.h)
# message(opus include:${opus_include_dir})
# include_directories(${opus_include_dir})

# include_directories(/usr/local/Cellar/opus/1.1/include/opus)
# find_library(libopus opus)
# find_library(libm m)
# message(${libopus})
# message(libm:${libm})
